package com.yykj.drup.server.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author zengg
 * @since 2022-03-30
 */
@Getter
@Setter
@TableName("order_sys")
@ApiModel(value = "Order对象", description = "")
public class Order{

    @ApiModelProperty("系统总订单主键id")
    @TableId("order_sys_id")
    private Integer orderSysId;

    @ApiModelProperty("系统总订单号")
    @TableField("order_sys_number")
    private String orderSysNumber;

    @ApiModelProperty("订单处方医生名称")
    @TableField("order_doctor_name")
    private String orderDoctorName;

    @ApiModelProperty("订单总金额")
    @TableField("order_total_price")
    private BigDecimal orderTotalPrice;

    @ApiModelProperty(value = "订单选择支付方式(微信)",example = "微信")
    @TableField("pay_type")
    private String payType;

    @ApiModelProperty("订单支付状态 1：待支付  2：待收货  3：已完成  4:已取消")
    @TableField("order_status")
    private Integer orderStatus;

    @ApiModelProperty("订单下单时间")

    @TableField("created_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdTime;

    @ApiModelProperty("订单支付时间")
    @TableField("pay_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime payTime;

    @ApiModelProperty("下单用户的ID")
    @TableField("consult_user_id")
    private String consultUserId;

    @ApiModelProperty("下单用户的名称")
    @TableField("consult_user_name")
    private String consultUserName;

    @ApiModelProperty("下单用户的详细地址")
    @TableField("consult_user_address")
    private String consultUserAddress;

    @ApiModelProperty("下单用户的电话")
    @TableField("consult_user_phone")
    private String consultUserPhone;

    @ApiModelProperty("医院ID")
    @TableField("hospital_id")
    private Integer hospitalId;

    @ApiModelProperty("处方ID")
    @TableField("prescription_id")
    private String prescriptionId;


    /*@ApiModelProperty("快递单当前状态，包括0在途，1揽收，2疑难，3签收，4退签，5派件，6退回，7转投，10待清关，11清关中，12已清关，13清关异常，14拒签 等13个状态")
    @TableField("order_express_state")
    private String orderExpressState;*/

    @ApiModelProperty(value = "删除状态",hidden = true)
    @TableField("is_deleted")
    private Integer isDeleted;

    @ApiModelProperty("药店订单信息")
    @TableField(exist = false)
    List<OrderInfo> storeOrders;

}
